<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/corelib/tools/qstringlist.cpp -->
<head>
  <title>Qt 4.3: QStringList Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QStringList Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1>
<p>The QStringList class provides a list of strings. <a href="#details">More...</a></p>
<pre> #include &lt;QStringList&gt;</pre><p>Inherits <a href="qlist.html">QList&lt;QString&gt;</a>.</p>
<p><b>Note:</b> All the functions in this class are <a href="threads.html#reentrant">reentrant</a>.</p>
<ul>
<li><a href="qstringlist-members.html">List of all members, including inherited members</a></li>
<li><a href="qstringlist-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qstringlist.html#QStringList">QStringList</a></b> ()</li>
<li><div class="fn"/><b><a href="qstringlist.html#QStringList-2">QStringList</a></b> ( const QString &amp; <i>str</i> )</li>
<li><div class="fn"/><b><a href="qstringlist.html#QStringList-3">QStringList</a></b> ( const QStringList &amp; <i>other</i> )</li>
<li><div class="fn"/><b><a href="qstringlist.html#QStringList-4">QStringList</a></b> ( const QList&lt;QString&gt; &amp; <i>other</i> )</li>
<li><div class="fn"/>bool <b><a href="qstringlist.html#contains">contains</a></b> ( const QString &amp; <i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive ) const</li>
<li><div class="fn"/>QStringList <b><a href="qstringlist.html#filter">filter</a></b> ( const QString &amp; <i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive ) const</li>
<li><div class="fn"/>QStringList <b><a href="qstringlist.html#filter-2">filter</a></b> ( const QRegExp &amp; <i>rx</i> ) const</li>
<li><div class="fn"/>int <b><a href="qstringlist.html#indexOf">indexOf</a></b> ( const QRegExp &amp; <i>rx</i>, int <i>from</i> = 0 ) const</li>
<li><div class="fn"/>int <b><a href="qstringlist.html#indexOf-2">indexOf</a></b> ( const QString &amp; <i>value</i>, int <i>from</i> = 0 ) const</li>
<li><div class="fn"/>QString <b><a href="qstringlist.html#join">join</a></b> ( const QString &amp; <i>separator</i> ) const</li>
<li><div class="fn"/>int <b><a href="qstringlist.html#lastIndexOf">lastIndexOf</a></b> ( const QRegExp &amp; <i>rx</i>, int <i>from</i> = -1 ) const</li>
<li><div class="fn"/>int <b><a href="qstringlist.html#lastIndexOf-2">lastIndexOf</a></b> ( const QString &amp; <i>value</i>, int <i>from</i> = -1 ) const</li>
<li><div class="fn"/>QStringList &amp; <b><a href="qstringlist.html#replaceInStrings">replaceInStrings</a></b> ( const QString &amp; <i>before</i>, const QString &amp; <i>after</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive )</li>
<li><div class="fn"/>QStringList &amp; <b><a href="qstringlist.html#replaceInStrings-2">replaceInStrings</a></b> ( const QRegExp &amp; <i>rx</i>, const QString &amp; <i>after</i> )</li>
<li><div class="fn"/>void <b><a href="qstringlist.html#sort">sort</a></b> ()</li>
<li><div class="fn"/>QStringList <b><a href="qstringlist.html#operator-2b">operator+</a></b> ( const QStringList &amp; <i>other</i> ) const</li>
<li><div class="fn"/>QStringList &amp; <b><a href="qstringlist.html#operator-lt-lt">operator&lt;&lt;</a></b> ( const QString &amp; <i>str</i> )</li>
<li><div class="fn"/>QStringList &amp; <b><a href="qstringlist.html#operator-lt-lt-2">operator&lt;&lt;</a></b> ( const QStringList &amp; <i>other</i> )</li>
</ul>
<ul>
<li><div class="fn"/>60 public functions inherited from <a href="qlist.html#public-functions">QList</a></li>
</ul>
<a name="related-non-members"></a>
<h3>Related Non-Members</h3>
<ul>
<li><div class="fn"/>typedef <b><a href="qstringlist.html#QMutableStringListIterator-typedef">QMutableStringListIterator</a></b></li>
<li><div class="fn"/>typedef <b><a href="qstringlist.html#QStringListIterator-typedef">QStringListIterator</a></b></li>
<li><div class="fn"/>QDataStream &amp; <b><a href="qstringlist.html#operator-lt-lt-57">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>out</i>, const QStringList &amp; <i>list</i> )</li>
<li><div class="fn"/>QDataStream &amp; <b><a href="qstringlist.html#operator-gt-gt-34">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>in</i>, QStringList &amp; <i>list</i> )</li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"/>3 static public members inherited from <a href="qlist.html#static-public-members">QList</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QStringList class provides a list of strings.</p>
<p>QStringList inherits from <a href="qlist.html">QList</a>&lt;<a href="qstring.html">QString</a>&gt;. Like <a href="qlist.html">QList</a>, QStringList is <a href="shared.html#implicitly-shared">implicitly shared</a>. It provides fast index-based access as well as fast insertions and removals. Passing string lists as value parameters is both fast and safe.</p>
<p>All of <a href="qlist.html">QList</a>'s functionality also applies to QStringList. For example, you can use <a href="qlist.html#isEmpty">isEmpty</a>() to test whether the list is empty, and you can call functions like <a href="qlist.html#append">append</a>(), <a href="qlist.html#prepend">prepend</a>(), <a href="qlist.html#insert">insert</a>(), <a href="qlist.html#replace">replace</a>(), and <a href="qlist-qt3.html#remove">remove</a>() to modify a QStringList. In addition, QStringList provides a few convenience functions that make handling lists of strings easier:</p>
<ul><li><a href="#adding-strings">Adding strings</a></li>
<li><a href="#iterating-over-the-strings">Iterating over the strings</a></li>
<li><a href="#manipulating-the-strings">Manipulating the strings</a></li>
</ul>
<a name="adding-strings"></a>
<h3>Adding strings</h3>
<p>Strings can be added to a list using the <a href="qlist.html#append">append()</a>, <a href="qlist.html#operator-2b-eq">operator+=</a>() and <a href="qstringlist.html#operator-lt-lt">operator&lt;&lt;</a>() functions. For example:</p>
<pre>     QStringList fonts;
     fonts &lt;&lt; &quot;Arial&quot; &lt;&lt; &quot;Helvetica&quot; &lt;&lt; &quot;Times&quot; &lt;&lt; &quot;Courier&quot;;</pre>
<a name="iterating-over-the-strings"></a>
<h3>Iterating over the strings</h3>
<p>To iterate over a list, you can either use index positions or <a href="qlist.html">QList</a>'s Java-style and STL-style iterator types:</p>
<p>Indexing:</p>
<pre>     for (int i = 0; i &lt; fonts.size(); ++i)
          cout &lt;&lt; fonts.at(i).toLocal8Bit().constData() &lt;&lt; endl;</pre>
<p>Java-style iterator:</p>
<pre>     QStringListIterator javaStyleIterator(fonts);
     while (javaStyleIterator.hasNext())
          cout &lt;&lt; javaStyleIterator.next().toLocal8Bit().constData() &lt;&lt; endl;</pre>
<p>STL-style iterator:</p>
<pre>     QStringList::const_iterator constIterator;
     for (constIterator = fonts.constBegin(); constIterator != fonts.constEnd();
            ++constIterator)
         cout &lt;&lt; (*constIterator).toLocal8Bit().constData() &lt;&lt; endl;</pre>
<p>The <a href="qstringlist.html#QStringListIterator-typedef">QStringListIterator</a> class is simply a type definition for <a href="qlistiterator.html">QListIterator</a>&lt;<a href="qstring.html">QString</a>&gt;. QStringList also provide the <a href="qstringlist.html#QMutableStringListIterator-typedef">QMutableStringListIterator</a> class which is a type definition for <a href="qmutablelistiterator.html">QMutableListIterator</a>&lt;<a href="qstring.html">QString</a>&gt;.</p>
<a name="manipulating-the-strings"></a>
<h3>Manipulating the strings</h3>
<p>QStringList provides several functions allowing you to manipulate the contents of a list. You can concatenate all the strings in a string list into a single string (with an optional separator) using the <a href="qstringlist.html#join">join</a>() function. For example:</p>
<pre>     QString str = fonts.join(&quot;,&quot;);
      <span class="comment">//</span> str == &quot;Arial,Helvetica,Times,Courier&quot;</pre>
<p>To break up a string into a string list, use the <a href="qstring.html#split">QString::split</a>() function:</p>
<pre>     QStringList list;
     list = str.split(&quot;,&quot;);
      <span class="comment">//</span> list: [&quot;Arial&quot;, &quot;Helvetica&quot;, &quot;Times&quot;, &quot;Courier&quot;]</pre>
<p>The argument to split can be a single character, a string, or a <a href="qregexp.html">QRegExp</a>.</p>
<p>In addition, the <a href="qstringlist.html#operator-2b">operator+</a>() function allows you to concatenate two string lists into one. To sort a string list, use the <a href="qstringlist.html#sort">sort</a>() function.</p>
<p><a href="qstring.html">QString</a> list also provides the <a href="qstringlist.html#filter">filter</a>() function which lets you to extract a new list which contains only those strings which contain a particular substring (or match a particular regular expression):</p>
<pre>     QStringList monospacedFonts = fonts.filter(QRegExp(&quot;Courier|Fixed&quot;));</pre>
<p>The <a href="qstringlist.html#contains">contains</a>() function tells you whether the list contains a given string, while the <a href="qstringlist.html#indexOf">indexOf</a>() function returns the index of the first occurrence of the given string. The <a href="qstringlist.html#lastIndexOf">lastIndexOf</a>() function on the other hand, returns the index of the last occurrence of the string.</p>
<p>Finally, the <a href="qstringlist.html#replaceInStrings">replaceInStrings</a>() function calls <a href="qstring.html#replace">QString::replace</a>() on each string in the string list in turn. For example:</p>
<pre>     QStringList files;
     files &lt;&lt; &quot;$QTDIR/src/moc/moc.y&quot;
           &lt;&lt; &quot;$QTDIR/src/moc/moc.l&quot;
           &lt;&lt; &quot;$QTDIR/include/qconfig.h&quot;;

     files.replaceInStrings(&quot;$QTDIR&quot;, &quot;/usr/lib/qt&quot;);
     <span class="comment">//</span> files: [ &quot;/usr/lib/qt/src/moc/moc.y&quot;, ...]</pre>
<p>See also <a href="qstring.html">QString</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QStringList"></a>QStringList::QStringList ()</h3>
<p>Constructs an empty string list.</p>
<h3 class="fn"><a name="QStringList-2"></a>QStringList::QStringList ( const <a href="qstring.html">QString</a> &amp; <i>str</i> )</h3>
<p>Constructs a string list that contains the given string, <i>str</i>. Longer lists are easily created like this:</p>
<pre>     QStringList longerList = (QStringList() &lt;&lt; str1 &lt;&lt; str2 &lt;&lt; str3);</pre>
<p>See also <a href="qlist.html#append">append</a>().</p>
<h3 class="fn"><a name="QStringList-3"></a>QStringList::QStringList ( const QStringList &amp; <i>other</i> )</h3>
<p>Constructs a copy of the <i>other</i> string list.</p>
<p>This operation takes <a href="containers.html#constant-time">constant time</a> because <a href="qstringlist.html">QStringList</a> is <a href="shared.html#implicitly-shared">implicitly shared</a>, making the process of returning a <a href="qstringlist.html">QStringList</a> from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and that takes <a href="containers.html#linear-time">linear time</a>.</p>
<p>See also <a href="qlist.html#operator-eq">operator=</a>().</p>
<h3 class="fn"><a name="QStringList-4"></a>QStringList::QStringList ( const <a href="qlist.html">QList</a>&lt;<a href="qstring.html">QString</a>&gt; &amp; <i>other</i> )</h3>
<p>Constructs a copy of <i>other</i>.</p>
<p>This operation takes <a href="containers.html#constant-time">constant time</a>, because <a href="qstringlist.html">QStringList</a> is <a href="shared.html#implicitly-shared">implicitly shared</a>. This makes returning a <a href="qstringlist.html">QStringList</a> from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and that takes <a href="containers.html#linear-time">linear time</a>.</p>
<p>See also <a href="qlist.html#operator-eq">operator=</a>().</p>
<h3 class="fn"><a name="contains"></a>bool QStringList::contains ( const <a href="qstring.html">QString</a> &amp; <i>str</i>, <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a> <i>cs</i> = Qt::CaseSensitive ) const</h3>
<p>Returns true if the list contains the string <i>str</i>; otherwise returns false. The search is case insensitive if <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseInsensitive</a>; the search is case sensitive by default.</p>
<p>See also <a href="qstringlist.html#indexOf">indexOf</a>(), <a href="qstringlist.html#lastIndexOf">lastIndexOf</a>(), and <a href="qstring.html#contains">QString::contains</a>().</p>
<h3 class="fn"><a name="filter"></a>QStringList QStringList::filter ( const <a href="qstring.html">QString</a> &amp; <i>str</i>, <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a> <i>cs</i> = Qt::CaseSensitive ) const</h3>
<p>Returns a list of all the strings containing the substring <i>str</i>.</p>
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (the default), the string comparison is case sensitive; otherwise the comparison is case insensitive.</p>
<pre>     QStringList list;
     list &lt;&lt; &quot;Bill Murray&quot; &lt;&lt; &quot;John Doe&quot; &lt;&lt; &quot;Bill Clinton&quot;;

     QStringList result;
     result = list.filter(&quot;Bill&quot;);
     <span class="comment">//</span> result: [&quot;Bill Murray&quot;, &quot;Bill Clinton&quot;]</pre>
<p>This is equivalent to</p>
<pre>     QStringList result;
     foreach (QString str, list) {
         if (str.contains(&quot;Bill&quot;))
             result += str;
     }</pre>
<p>See also <a href="qstringlist.html#contains">contains</a>().</p>
<h3 class="fn"><a name="filter-2"></a>QStringList QStringList::filter ( const <a href="qregexp.html">QRegExp</a> &amp; <i>rx</i> ) const</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Returns a list of all the strings that match the regular expression <i>rx</i>.</p>
<h3 class="fn"><a name="indexOf"></a>int QStringList::indexOf ( const <a href="qregexp.html">QRegExp</a> &amp; <i>rx</i>, int <i>from</i> = 0 ) const</h3>
<p>Returns the index position of the first exact match of <i>rx</i> in the list, searching forward from index position <i>from</i>. Returns -1 if no item matched.</p>
<p>See also <a href="qstringlist.html#lastIndexOf">lastIndexOf</a>(), <a href="qstringlist.html#contains">contains</a>(), and <a href="qregexp.html#exactMatch">QRegExp::exactMatch</a>().</p>
<h3 class="fn"><a name="indexOf-2"></a>int QStringList::indexOf ( const <a href="qstring.html">QString</a> &amp; <i>value</i>, int <i>from</i> = 0 ) const</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Returns the index position of the first occurrence of <i>value</i> in the list, searching forward from index position <i>from</i>. Returns -1 if no item matched.</p>
<p>See also <a href="qstringlist.html#lastIndexOf">lastIndexOf</a>(), <a href="qstringlist.html#contains">contains</a>(), and <a href="qlist.html#indexOf">QList::indexOf</a>().</p>
<h3 class="fn"><a name="join"></a><a href="qstring.html">QString</a> QStringList::join ( const <a href="qstring.html">QString</a> &amp; <i>separator</i> ) const</h3>
<p>Joins all the string list's strings into a single string with each element separated by the the given <i>separator</i> (which can be an empty string).</p>
<p>See also <a href="qstring.html#split">QString::split</a>().</p>
<h3 class="fn"><a name="lastIndexOf"></a>int QStringList::lastIndexOf ( const <a href="qregexp.html">QRegExp</a> &amp; <i>rx</i>, int <i>from</i> = -1 ) const</h3>
<p>Returns the index position of the last exact match of <i>rx</i> in the list, searching backward from index position <i>from</i>. If <i>from</i> is -1 (the default), the search starts at the last item. Returns -1 if no item matched.</p>
<p>See also <a href="qstringlist.html#indexOf">indexOf</a>(), <a href="qstringlist.html#contains">contains</a>(), and <a href="qregexp.html#exactMatch">QRegExp::exactMatch</a>().</p>
<h3 class="fn"><a name="lastIndexOf-2"></a>int QStringList::lastIndexOf ( const <a href="qstring.html">QString</a> &amp; <i>value</i>, int <i>from</i> = -1 ) const</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Returns the index position of the last occurrence of <i>value</i> in the list, searching backward from index position <i>from</i>. If <i>from</i> is -1 (the default), the search starts at the last item. Returns -1 if no item matched.</p>
<p>See also <a href="qstringlist.html#indexOf">indexOf</a>() and <a href="qlist.html#lastIndexOf">QList::lastIndexOf</a>().</p>
<h3 class="fn"><a name="replaceInStrings"></a>QStringList &amp; QStringList::replaceInStrings ( const <a href="qstring.html">QString</a> &amp; <i>before</i>, const <a href="qstring.html">QString</a> &amp; <i>after</i>, <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a> <i>cs</i> = Qt::CaseSensitive )</h3>
<p>Returns a string list where every string has had the <i>before</i> text replaced with the <i>after</i> text wherever the <i>before</i> text is found. The <i>before</i> text is matched case-sensitively or not depending on the <i>cs</i> flag.</p>
<p>For example:</p>
<pre>     QStringList list;
     list &lt;&lt; &quot;alpha&quot; &lt;&lt; &quot;beta&quot; &lt;&lt; &quot;gamma&quot; &lt;&lt; &quot;epsilon&quot;;
     list.replaceInStrings(&quot;a&quot;, &quot;o&quot;);
     <span class="comment">//</span> list == [&quot;olpho&quot;, &quot;beto&quot;, &quot;gommo&quot;, &quot;epsilon&quot;]</pre>
<p>See also <a href="qstring.html#replace">QString::replace</a>().</p>
<h3 class="fn"><a name="replaceInStrings-2"></a>QStringList &amp; QStringList::replaceInStrings ( const <a href="qregexp.html">QRegExp</a> &amp; <i>rx</i>, const <a href="qstring.html">QString</a> &amp; <i>after</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Replaces every occurrence of the regexp <i>rx</i>, in each of the string lists's strings, with <i>after</i>. Returns a reference to the string list.</p>
<p>For example:</p>
<pre>     QStringList list;
     list &lt;&lt; &quot;alpha&quot; &lt;&lt; &quot;beta&quot; &lt;&lt; &quot;gamma&quot; &lt;&lt; &quot;epsilon&quot;;
     list.replaceInStrings(QRegExp(&quot;^a&quot;), &quot;o&quot;);
     <span class="comment">//</span> list == [&quot;olpha&quot;, &quot;beta&quot;, &quot;gamma&quot;, &quot;epsilon&quot;]</pre>
<p>For regular expressions that contain <a href="qregexp.html#capturing-parentheses">capturing parentheses</a>, occurrences of <b>\1</b>, <b>\2</b>, ..&#x2e;, in <i>after</i> are replaced with <i>rx</i>.cap(1), <i>rx</i>.cap(2), ..&#x2e;</p>
<p>For example:</p>
<pre>     QStringList list;
     list &lt;&lt; &quot;Bill Clinton&quot; &lt;&lt; &quot;Murray, Bill&quot;;
     list.replaceInStrings(QRegExp(&quot;^(.*), (.*)$&quot;), &quot;\\2 \\1&quot;);
     <span class="comment">//</span> list == [&quot;Bill Clinton&quot;, &quot;Bill Murray&quot;]</pre>
<h3 class="fn"><a name="sort"></a>void QStringList::sort ()</h3>
<p>Sorts the list of strings in ascending order (case sensitively).</p>
<p>Sorting is performed using Qt's <a href="qtalgorithms.html#qSort">qSort</a>() algorithm, which operates in <a href="containers.html#linear-logarithmic-time">linear-logarithmic time</a>, i.e&#x2e; O(<i>n</i> log <i>n</i>).</p>
<p>If you want to sort your strings in an arbitrary order, consider using the <a href="qmap.html">QMap</a> class. For example, you could use a <a href="qmap.html">QMap</a>&lt;<a href="qstring.html">QString</a>, <a href="qstring.html">QString</a>&gt; to create a case-insensitive ordering (e.g&#x2e; with the keys being lower-case versions of the strings, and the values being the strings), or a <a href="qmap.html">QMap</a>&lt;int, <a href="qstring.html">QString</a>&gt; to sort the strings by some integer index.</p>
<p>See also <a href="qtalgorithms.html#qSort">qSort</a>().</p>
<h3 class="fn"><a name="operator-2b"></a>QStringList QStringList::operator+ ( const QStringList &amp; <i>other</i> ) const</h3>
<p>Returns a string list that is the concatenation of this string list with the <i>other</i> string list.</p>
<p>See also <a href="qlist.html#append">append</a>().</p>
<h3 class="fn"><a name="operator-lt-lt"></a>QStringList &amp; QStringList::operator&lt;&lt; ( const <a href="qstring.html">QString</a> &amp; <i>str</i> )</h3>
<p>Appends the given string, <i>str</i>, to this string list and returns a reference to the string list.</p>
<p>See also <a href="qlist.html#append">append</a>().</p>
<h3 class="fn"><a name="operator-lt-lt-2"></a>QStringList &amp; QStringList::operator&lt;&lt; ( const QStringList &amp; <i>other</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Appends the <i>other</i> string list to the string list and returns a reference to the latter string list.</p>
<hr />
<h2>Related Non-Members</h2>
<h3 class="fn"><a name="QMutableStringListIterator-typedef"></a>typedef QMutableStringListIterator</h3>
<p>The <a href="qstringlist.html#QStringListIterator-typedef">QStringListIterator</a> type definition provides a Java-style non-const iterator for <a href="qstringlist.html">QStringList</a>.</p>
<p><a href="qstringlist.html">QStringList</a> provides both <a href="containers.html#java-style-iterators">Java-style iterators</a> and <a href="containers.html#stl-style-iterators">STL-style iterators</a>. The Java-style non-const iterator is simply a type definition for <a href="qmutablelistiterator.html">QMutableListIterator</a>&lt;<a href="qstring.html">QString</a>&gt;.</p>
<p>See also <a href="qstringlist.html#QStringListIterator-typedef">QStringListIterator</a> and <a href="qlist-iterator.html">QStringList::iterator</a>.</p>
<h3 class="fn"><a name="QStringListIterator-typedef"></a>typedef QStringListIterator</h3>
<p>The QStringListIterator type definition provides a Java-style const iterator for <a href="qstringlist.html">QStringList</a>.</p>
<p><a href="qstringlist.html">QStringList</a> provides both <a href="containers.html#java-style-iterators">Java-style iterators</a> and <a href="containers.html#stl-style-iterators">STL-style iterators</a>. The Java-style const iterator is simply a type definition for <a href="qlistiterator.html">QListIterator</a>&lt;<a href="qstring.html">QString</a>&gt;.</p>
<p>See also <a href="qstringlist.html#QMutableStringListIterator-typedef">QMutableStringListIterator</a> and <a href="qlist-const-iterator.html">QStringList::const_iterator</a>.</p>
<h3 class="fn"><a name="operator-lt-lt-57"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&lt;&lt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>out</i>, const QStringList &amp; <i>list</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Writes the given string <i>list</i> to the specified <i>out</i> stream.</p>
<p>See also <a href="datastreamformat.html">Format of the QDataStream Operators</a>.</p>
<h3 class="fn"><a name="operator-gt-gt-34"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&gt;&gt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>in</i>, QStringList &amp; <i>list</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Reads a string list from the given <i>in</i> stream into the specified <i>list</i>.</p>
<p>See also <a href="datastreamformat.html">Format of the QDataStream Operators</a>.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
